<!DOCTYPE html>






  


<html class="theme-next pisces use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.2.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.2.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.2.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.2.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.2.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '6.2.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '884IXKDARU',
      apiKey: '73268cbd2090d14ab01f9fd7b9874762',
      indexName: 'hexo-blogs',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="相关背景其实我也不知道MTR是干嘛使用的，不过我大致知道它是一个网络诊断工具，源码是使用C/C++编写的。 它的源码位于https://github.com/traviscross/mtr。 我们去官网看看README.md，大致长这样子的：">
<meta name="keywords" content="C&#x2F;C++,MTR">
<meta property="og:type" content="article">
<meta property="og:title" content="手把手教你如何交叉编译MTR二进制程序">
<meta property="og:url" content="http://linkscue.com/2018/04/10/2018-04-10-how-to-cross-build-mtr/index.html">
<meta property="og:site_name" content="Linkscue&#39;s blogs">
<meta property="og:description" content="相关背景其实我也不知道MTR是干嘛使用的，不过我大致知道它是一个网络诊断工具，源码是使用C/C++编写的。 它的源码位于https://github.com/traviscross/mtr。 我们去官网看看README.md，大致长这样子的：">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5fj41xj20u80jaq88">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5hcnkwj20lm0dqtct">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5hcqitj20o10ieteo">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5h7xrij20o10ie79w">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5egjd4j20ht06c757">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5gv17tj20rc0l8wpw">
<meta property="og:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5f4isjj20r503sq3t">
<meta property="og:updated_time" content="2018-04-21T00:32:20.344Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="手把手教你如何交叉编译MTR二进制程序">
<meta name="twitter:description" content="相关背景其实我也不知道MTR是干嘛使用的，不过我大致知道它是一个网络诊断工具，源码是使用C/C++编写的。 它的源码位于https://github.com/traviscross/mtr。 我们去官网看看README.md，大致长这样子的：">
<meta name="twitter:image" content="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5fj41xj20u80jaq88">



  <link rel="alternate" href="/atom.xml" title="Linkscue's blogs" type="application/atom+xml" />




  <link rel="canonical" href="http://linkscue.com/2018/04/10/2018-04-10-how-to-cross-build-mtr/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>手把手教你如何交叉编译MTR二进制程序 | Linkscue's blogs</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Linkscue's blogs</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">清風有情君意愜, 夢徊怡江詩心緣。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>




<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />关于</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档</a>
  </li>

      
      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />搜索</a>
        </li>
      
    </ul>
  

  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup search-popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2018/04/10/2018-04-10-how-to-cross-build-mtr/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">手把手教你如何交叉编译MTR二进制程序
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-04-10 18:54:53" itemprop="dateCreated datePublished" datetime="2018-04-10T18:54:53+08:00">2018-04-10</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-04-21 08:32:20" itemprop="dateModified" datetime="2018-04-21T08:32:20+08:00">2018-04-21</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="相关背景"><a href="#相关背景" class="headerlink" title="相关背景"></a>相关背景</h1><p>其实我也不知道MTR是干嘛使用的，不过我大致知道它是一个网络诊断工具，源码是使用C/C++编写的。</p>
<p>它的源码位于<code>https://github.com/traviscross/mtr</code>。</p>
<p>我们去官网看看README.md，大致长这样子的：</p>
<a id="more"></a>
<p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5fj41xj20u80jaq88" alt=""></p>
<p>Don’t panic，一切都是如此简单，我们只需要一个Docker环境就，配合使用<code>dockcross/linux-armv7</code>可以进行交叉编译了。</p>
<p><strong> 你有疑问？</strong></p>
<ol>
<li><p>关于<code>Docker</code>：可以到官网 <a href="https://www.docker.com/get-docker" target="_blank" rel="noopener">https://www.docker.com/get-docker</a> 下载来安装试一下。</p>
</li>
<li><p>关于<code>dockcross/linux-armv7</code>镜像：你可以从这里（<code>https://github.com/dockcross/dockcross</code>）获取更多信息，这里就不再重复了。</p>
</li>
</ol>
<h1 id="源码下载"><a href="#源码下载" class="headerlink" title="源码下载"></a>源码下载</h1><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/traviscross/mtr</span><br></pre></td></tr></table></figure>
<p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5hcnkwj20lm0dqtct" alt=""></p>
<h1 id="进入交叉编译环境"><a href="#进入交叉编译环境" class="headerlink" title="进入交叉编译环境"></a>进入交叉编译环境</h1><p>如果你已经安装好了docker环境，直接运行以下命令（若找不到镜像它会自动下载）</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run --rm -it -v <span class="variable">$PWD</span>/mtr:/work dockcross/linux-armv7 bash</span><br></pre></td></tr></table></figure>
<h1 id="编译ARM版本的二进制文件"><a href="#编译ARM版本的二进制文件" class="headerlink" title="编译ARM版本的二进制文件"></a>编译ARM版本的二进制文件</h1><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./bootstrap.sh &amp;&amp; ./configure &amp;&amp; make &amp;&amp; make install</span><br></pre></td></tr></table></figure>
<p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5hcqitj20o10ieteo" alt=""></p>
<p>我们检查一下它安装的二进制文件：</p>
<p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5h7xrij20o10ie79w" alt=""></p>
<p>发现安装的是<code>mtr</code>和<code>mtr-packet</code>文件（当然，这只是安装到你的Docker容器里边，与宿主机没有一毛钱关系）。</p>
<h1 id="确认一下依赖库"><a href="#确认一下依赖库" class="headerlink" title="确认一下依赖库"></a>确认一下依赖库</h1><p>有一些二进制运行的时候，有依赖库文件，检查二进制依赖哪些库，可以使用<code>ldd</code>命令 ，如下：</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># ldd /bin/grep</span></span><br><span class="line"> linux-vdso.so.1 (0x00007ffcdb99c000)</span><br><span class="line"> libpcre.so.3 =&gt; /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff9c907b000)</span><br><span class="line"> libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff9c8e77000)</span><br><span class="line"> libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff9c8acc000)</span><br><span class="line"> libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff9c88af000)</span><br><span class="line"> /lib64/ld-linux-x86-64.so.2 (0x00007ff9c951c000)</span><br></pre></td></tr></table></figure>
<p>但是，ldd去检查ARM版本的二进制程序的时候就不太正常，如下：</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># ldd mtr</span></span><br><span class="line"> not a dynamic executable</span><br><span class="line"><span class="comment"># file mtr</span></span><br><span class="line">mtr: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, <span class="keyword">for</span> GNU/Linux 2.6.32, BuildID[sha1]=b98457bce3813c13f0bdf346cbdb21e023e395b5, not stripped</span><br></pre></td></tr></table></figure>
<p>因此，我们换一种方式，使用<code>arm-linux-gnueabihf-readelf</code>去检查就好了：</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># arm-linux-gnueabihf-readelf -a mtr | grep Shared</span></span><br><span class="line"> 0x00000001 (NEEDED) Shared library: [libresolv.so.2]</span><br><span class="line"> 0x00000001 (NEEDED) Shared library: [libncurses.so.5]</span><br><span class="line"> 0x00000001 (NEEDED) Shared library: [libtinfo.so.5]</span><br><span class="line"> 0x00000001 (NEEDED) Shared library: [libm.so.6]</span><br><span class="line"> 0x00000001 (NEEDED) Shared library: [libc.so.6]</span><br></pre></td></tr></table></figure>
<h1 id="检查哪些依赖库不存在"><a href="#检查哪些依赖库不存在" class="headerlink" title="检查哪些依赖库不存在"></a>检查哪些依赖库不存在</h1><p>一般而言，玩客云上边的动态库运行的时候，通常可能是从以下位置加载的：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">/lib</span><br><span class="line">/lib32</span><br><span class="line">/libexec</span><br><span class="line">/usr/lib</span><br><span class="line">/usr/lib32</span><br><span class="line">/usr/libexec</span><br><span class="line">/app/system/usr/lib</span><br><span class="line">/thunder/lib</span><br></pre></td></tr></table></figure>
<p>其中的<code>/thunder/lib</code>是一般都是手工在脚本里边去添加的<code>LD_LIBRARY_PATH</code>变量里边去的。</p>
<p>我们可以通过一个脚本去检查这些动态库是否存在，比如我写了一个简单的检查脚本，位于 <a href="https://gist.github.com/scue/c8879958ea76dcbc1463eda4ada4e768" target="_blank" rel="noopener">https://gist.github.com/scue/c8879958ea76dcbc1463eda4ada4e768</a> </p>
<p>通过检查得到，发现libtinfo.so是查找不到的，如下：</p>
<p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5egjd4j20ht06c757" alt=""></p>
<h1 id="一种解决方式"><a href="#一种解决方式" class="headerlink" title="一种解决方式"></a>一种解决方式</h1><p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5gv17tj20rc0l8wpw" alt=""></p>
<p>解决方式有多种，一种是自己去下载libtinfo相关源码，然后自己编译，另一种是可以像我这样子直接看看<code>/app</code>目录之下是否有人已经编译出来了。</p>
<p>总结起来就是如下几行命令：</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">find /app -name libtinfo.so\* <span class="comment"># 找到动态库</span></span><br><span class="line">cp /app/docker/aufs/diff/289eedd8bcde52c970e6a6439faa943fed1fe03629e4e0667402325c52026af0/lib/arm-linux-gnueabi/libtinfo.so.5 /tmp/lib/</span><br><span class="line"><span class="built_in">export</span> TERM=xterm</span><br><span class="line">/tmp/mtr <span class="comment"># 运行程序</span></span><br></pre></td></tr></table></figure>
<p><img src="https://ws1.sinaimg.cn/large/6e22ca27gy1fqjz5f4isjj20r503sq3t" alt=""></p>
<p>All Done，如有问题，重新阅读一遍文章，保存此文章可以当作手册来使用。<code>(⊙o⊙)</code></p>

      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/C-C/" rel="tag"># C/C++</a>
          
            <a href="/tags/MTR/" rel="tag"># MTR</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/04/10/2018-04-10-nodejs-koa-handle-put-upload-file/" rel="next" title="使用Node.js来写一个文件上传服务器">
                <i class="fa fa-chevron-left"></i> 使用Node.js来写一个文件上传服务器
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/04/20/2018-04-20-how-to-rescue-your-macbook/" rel="prev" title="关键时刻，拿什么来拯救你的Mac？">
                关键时刻，拿什么来拯救你的Mac？ <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/assets/images/avatar.png"
                alt="linkscue(scue)" />
            
              <p class="site-author-name" itemprop="name">linkscue(scue)</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">43</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">3</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">29</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/scue" target="_blank" title="GitHub"><i class="fa fa-fw fa-github"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="mailto:scue@vip.qq.com" target="_blank" title="邮箱"><i class="fa fa-fw fa-envelope"></i>邮箱</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://weibo.com/scue" target="_blank" title="微博"><i class="fa fa-fw fa-weibo"></i>微博</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://www.douban.com/people/scue/" target="_blank" title="豆瓣"><i class="fa fa-fw fa-book"></i>豆瓣</a>
                  
                </span>
              
            </div>
          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#相关背景"><span class="nav-number">1.</span> <span class="nav-text">相关背景</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#源码下载"><span class="nav-number">2.</span> <span class="nav-text">源码下载</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#进入交叉编译环境"><span class="nav-number">3.</span> <span class="nav-text">进入交叉编译环境</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#编译ARM版本的二进制文件"><span class="nav-number">4.</span> <span class="nav-text">编译ARM版本的二进制文件</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#确认一下依赖库"><span class="nav-number">5.</span> <span class="nav-text">确认一下依赖库</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#检查哪些依赖库不存在"><span class="nav-number">6.</span> <span class="nav-text">检查哪些依赖库不存在</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#一种解决方式"><span class="nav-number">7.</span> <span class="nav-text">一种解决方式</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">linkscue(scue)</span>

  

  
</div>




  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动 v3.6.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/theme-next/hexo-theme-next">NexT.Pisces</a> v6.2.0</div>




        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.2.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.2.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.2.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.2.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.2.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.2.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.2.0"></script>



  



	





  





  










  




  
  
  
  <link rel="stylesheet" href="/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/js/src/algolia-search.js?v=6.2.0"></script>



  

  

  

  
  

  
  

  


  
  

  

  

  

  

  

</body>
</html>
